package verification

npu_pcrs[npu_id] := pcrs {
    # Safely collect all evidence keys
    npu_ids := {id | some id; input.evidence[id]}
    npu_id := npu_ids[_]

    npu_data := input.evidence[npu_id]

    pcrs := {
        "pcrs": npu_data.pcrs,
        "tcg_event_log_status": npu_data.tcg_event_log_status,
        "tcg_event_log_ref_value_match_status": npu_data.tcg_event_log_ref_value_match_status,
        "ima_log_status": npu_data.ima_log_status,
        "ima_log_ref_value_match_status": npu_data.ima_log_ref_value_match_status
    }
}

result := {
    "annotated_evidence": npu_pcrs,
    "ear_trustworthiness_vector": {
        "hardware_value": input.hardware_value,
        "executables_value": input.executables_value
    }
}